from selenium import webdriver
from selenium.webdriver.common.by import By
import time

class Login:
    def __init__(self):
        self.driver=webdriver.Chrome()
        self.driver.get('https://mail.163.com/')
    def login(self):
        time.sleep(5)

        inner=self.driver.find_elements(By.TAG_NAME,'iframe')
        self.driver.switch_to.frame(inner)
        time.sleep(2)
        self.driver.find_element(By.NAME, 'email').send_keys('hjx1975501282')
        time.sleep(2)
        self.driver.find_element(By.NAME, 'password').send_keys('12345')
        # time.sleep(10)
        self.driver.find_element(By.ID, 'dologin').click()



if __name__ == '__main__':
    lo=Login()
    lo.login()